<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>用户登录与注册</title>

</head>
<style>
  body, html {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: 'Arial', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f7f7f7;
  }
  .container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background-color: #fff;
    border-radius: 8px;
  }
  .form-wrapper {
    flex: 1;
    max-width: 400px;
  }
  .form-wrapper h2 {
    color: #333;
  }
  form {
    display: flex;
    flex-direction: column;
  }
  label {
    margin-bottom: 5px;
    font-weight: bold;
  }
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="submit"] {
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid #ccc;
  }
  input[type="submit"] {
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
  }
  input[type="submit"]:hover {
    background-color: #2980b9;
  }
  .error {
    color: red;
    margin-bottom: 20px;
  }
</style>
<body>
<div class="container">
<div class="left-side">
<form action="User" method="post">
<h2>用户登录</h2>
<label for="user_account">账号:</label><br>
<input type="text" id="user_account" name="user_account" required><br>

<label for="user_pwd">密码:</label><br>
<input type="password" id="user_pwd" name="user_pwd" required><br>

<input type="hidden" name="btn" value="login"/>
<%if("3".equals(request.getParameter("ret"))){
	out.println("<span>账号名或密码错误</span>");

	}%>

<button type="submit">登录</button>
</form>
</div>
<div class="right-side">
<form action="User" method="post">
<h2>用户注册</h2>
<label for="user_account">账号:</label><br>
<input type="text" id="user_account" name="user_account" required><br>

<label for="user_name">姓名:</label><br>
<input type="text" id="user_name" name="user_name" required><br>

<label for="user_pwd">密码:</label><br>
<input type="password" id="user_pwd" name="user_pwd" required placeholder="密码包含大小写,不小于8个字符"><br>

<label for="user_phone">联系电话:</label><br>
<input type="text" id="user_phone" name="user_phone" required><br>

<label for="user_email">Email:</label><br>
<input type="email" id="user_email" name="user_email" required><br>

<%if("1".equals(request.getParameter("ret"))){
	out.println("<span>注册成功</span>");
}else if("0".equals(request.getParameter("ret"))){
	out.println("<span>注册失败</span>");
	}%>


<button type="submit">注册</button>


</form>




</div>

</div>


</body>
</html>
  